package com.mrzhou.core.tool.constants;

import java.util.Properties;

public interface NacosConstant {

    static String sharedDataIds(String profile) {
        return "cloud.yaml,cloud-" + profile + "." + "yaml";
    }

    /**
     *  默认实现
     * @param prop
     */
    static void setSharedDataIds(Properties prop, String profile) {
        prop.setProperty("spring.cloud.nacos.config.shared-configs[0].dataId", "cloud.yaml");
        prop.setProperty("spring.cloud.nacos.config.shared-configs[0].refresh", "true");
        prop.setProperty("spring.cloud.nacos.config.shared-configs[1].dataId", "cloud-" + profile + ".yaml");
        prop.setProperty("spring.cloud.nacos.config.shared-configs[1].refresh", "true");
    }

}
